#pragma once
#include "stdafx.h"
#include "InputClass.h"
#include "GraphicsClass.h"
#include "ResourceManager.h"
#include "Timer.h"
#include "CameraClass.h"
#include "DataStream.h"
#include "Log.h"
#include "Logic.h"
#include "Config.h"
#include "Control.h"

class ResourceManager;
class InputClass;
class GraphicsClass;
class Manager;
class Component;
class Object;
class Log;
class Config;
class Logic;
class Control;
class CameraClass;
class Timer;

class SystemClass 
{
private:

public:
	SystemClass();
	~SystemClass();

	bool Initialize();
	void Run();

	LRESULT CALLBACK MessageHandler(HWND, UINT, WPARAM, LPARAM);

private:
	bool Frame();
	void InitializeWindows(int&, int&, bool);
	void ShutdownWindows();
	void InitObjects();
	
private:
	string m_applicationName;
	HINSTANCE m_hinstance;
	HWND m_hwnd;

	ResourceManager::sPtr m_resourceManager;
	InputClass::sPtr m_Input;
	GraphicsClass::sPtr m_Graphics;
	Manager::sPtr m_Manager;
	Log::sPtr m_Log;
	Logic::sPtr m_Logic;
	Config::sPtr m_Config;
	Control::sPtr m_Control;
	CameraClass::sPtr m_camera;
	boost::shared_ptr<Timer> m_timer;

};


/////////////////////////
// FUNCTION PROTOTYPES //
/////////////////////////
static LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);


/////////////
// GLOBALS //
/////////////
static SystemClass* ApplicationHandle = 0;